# Author:Yiye
# -*- codeing = utf-8 -*-
# @Time :2021/11/29 7:14
# @Author:李卓
# @Site : 
# @File : 35.Matplotlib.py
# @Software : PyCharm
import PySimpleGUI as sg

# event, values = sg.Window('Login Window',
#                   [[sg.T('Enter your Login ID'), sg.In(key='-ID-')],
#                   [sg.B('OK'), sg.B('Cancel') ]]).read(close=True)
# login_id = values['-ID-']


long_string = '123456789 '* 40

event, values = sg.Window('This is my customn popup',
                  [[sg.Text(long_string, size=(40,None))],
                  [sg.B('OK'), sg.B('Cancel') ]]).read(close=True)
print(values)

# def Canvas(canvas - a tkinter canvasf if you created one. Normally not set
#          background_color - canvas color
#          size - size in pixels
#          pad - element padding for packing
#          key - key used to lookup element
#          tooltip - tooltip text)
#
#     figure_x, figure_y, figure_w, figure_h = fig.bbox.bounds
#     # define the window layout
#     layout = [[sg.Text('Plot test')],
#               [sg.Canvas(size=(figure_w, figure_h), key='canvas')],
#               [sg.OK(pad=((figure_w / 2, 0), 3), size=(4, 2))]]
#
#     # create the window and show it without the plot
#     window = sg.Window('Demo Application - Embedding Matplotlib In PySimpleGUI', layout).Finalize()
#
#     # add the plot to the window
#     fig_photo = draw_figure(window['canvas'].TKCanvas, fig)
#
#     # show it all again and get buttons
